<#include "../header.ftl">
<html>

<body>

<#include "../nav-top.ftl">
<div class="sui-container" style="margin-top: 30px;">
    <ul class="sui-breadcrumb" style="padding: 0px 0px">
        <li><a href="#">账号群组管理</a></li>
        <li class="active">群组管理</li>
    </ul>
    <div class="sui-row-fluid">
        <div class="span1">
            <ul class="sui-nav nav-list nav-xlarge nav-user-type">
                <li class="active" data-type="0"><a>正常</a></li>
                <li data-type="1"><a>注销</a></li>
            </ul>
        </div>
        <div class="span11" id="type-normal">
            <form id="form-msg" class="sui-form form-horizontal" novalidate="novalidate">
                <div class="control-group">
                    <label for="groupName1">群组名称：</label>
                    <div class="controls">
                        <input type="text" id="groupName1" name="groupName1" placeholder="群组名称" data-rules="required"
                               class="input-large">
                    </div>
                    &nbsp;&nbsp;
                    <label for="groupLevel1">群组级别：</label>
                    <div class="controls">
                        <select class="input-large" id="groupLevel1">
                            <option value="">全部</option>
                        <#list groupLevel as level>
                            <option value="${level.codeValue}">${level.codeName}</option>
                        </#list>
                        </select>
                    </div>
                    &nbsp;&nbsp;
                    <label for="groupType1">群组分类：</label>
                    <div class="controls">
                    <#--<input type="text" id="inputEmail" name="email" placeholder="群组名称" data-rules="required">-->
                        <select class="input-large" id="groupType1">
                            <option value="">全部</option>
                        <#list groupType as type>
                            <option value="${type.codeValue}">${type.codeName}</option>
                        </#list>
                        </select>
                    </div>
                </div>
                <div class="control-group">
                    <label for="beginTime1">开始日期：</label>
                    <div class="controls">
                        <input type="text" id="beginTime1" data-rules="required|date" name="beginTime1"
                               class="input-large"
                               data-toggle="datepicker">
                    </div>
                    &nbsp;&nbsp;
                    <label for="endTime1">结束日期：</label>
                    <div class="controls">
                        <input type="text" id="endTime1" data-rules="required|date" name="endTime1" class="input-large"
                               data-toggle="datepicker">
                    </div>
                    &nbsp;&nbsp;
                    <a href="javascript:void(0);" class="sui-btn btn-large query-normal">查询</a>&nbsp;
                    <a href="/group/toAdd" class="sui-btn btn-large">创建</a>&nbsp;
                    <a href="javascript:void(0);" class="sui-btn btn-large dis-activate-all">注销</a>
                </div>
            </form>
            <table class="sui-table table-bordered rowover-table" id="tab-normal">
                <thead>
                <tr>
                    <th><input type="checkbox" class="check-all-normal"/></th>
                    <th>群组名称</th>
                    <th>创建日期</th>
                    <th>群组级别</th>
                    <th>群组分类</th>
                    <th>备注</th>
                    <th>操作</th>
                </tr>
                </thead>
                <tbody>

                </tbody>
            </table>
            <div class="sui-pagination pagination-large normal-pagination" style="float: right">
                <ul>
                    <li class="prev disabled"><a href="#">«上一页</a></li>
                    <li class="next"><a href="#">下一页»</a></li>
                </ul>
            </div>
        </div>
        <div class="span11" id="type-delete" style="display: none">
            <form id="form-msg" class="sui-form form-horizontal" novalidate="novalidate">
                <div class="control-group">
                    <label for="groupName2">群组名称：</label>
                    <div class="controls">
                        <input type="text" id="groupName2" name="groupName2" placeholder="群组名称" data-rules="required"
                               class="input-large">
                    </div>
                    &nbsp;&nbsp;
                    <label for="groupLevel2">群组级别：</label>
                    <div class="controls">
                    <#--<input type="text" id="inputEmail" name="email" placeholder="群组名称" data-rules="required">-->
                        <select class="input-large" id="groupLevel2">
                            <option value="">全部</option>
                        <#list groupLevel as level>
                            <option value="${level.codeValue}">${level.codeName}</option>
                        </#list>
                        </select>
                    </div>
                    &nbsp;&nbsp;
                    <label for="grouptype2">群组分类：</label>
                    <div class="controls">
                    <#--<input type="text" id="inputEmail" name="email" placeholder="群组名称" data-rules="required">-->
                        <select class="input-large" id="grouptype2">
                            <option value="">全部</option>
                        <#list groupType as type>
                            <option value="${type.codeValue}">${type.codeName}</option>
                        </#list>
                        </select>
                    </div>
                </div>
                <div class="control-group">
                    <label for="beginTime2">开始日期：</label>
                    <div class="controls">
                        <input type="text" id="beginTime2" data-rules="required|date" name="beginTime2"
                               class="input-large"
                               data-toggle="datepicker">
                    </div>
                    &nbsp;&nbsp;
                    <label for="endTime2">结束日期：</label>
                    <div class="controls">
                        <input type="text" id="endTime2" data-rules="required|date" name="endTime2" class="input-large"
                               data-toggle="datepicker">
                    </div>
                    &nbsp;&nbsp;
                    <a href="javascript:void(0);" class="sui-btn btn-large query-delete">查询</a>&nbsp;
                    <a href="javascript:void(0);" class="sui-btn btn-large activate-all">启用</a>
                </div>
            </form>
            <table class="sui-table table-bordered rowover-table" id="tab-delete">
                <thead>
                <tr>
                    <th><input type="checkbox" class="check-all-delete"/></th>
                    <th>群组名称</th>
                    <th>创建日期</th>
                    <th>注销日期</th>
                    <th>群组级别</th>
                    <th>群组分类</th>
                    <th>备注</th>
                    <th>操作</th>
                </tr>
                </thead>
                <tbody>

                </tbody>
            </table>
            <div class="sui-pagination pagination-large delete-pagination" style="float: right">
                <ul>
                    <li class="prev disabled"><a href="#">«上一页</a></li>
                    <li class="next"><a href="#">下一页»</a></li>
                </ul>
            </div>
        </div>
    </div>
</div>
<#include "../footer.ftl">
<script src="../../static/js/plugins/sea/sea.js"></script>
<script src="../../static/js/sea.config.js"></script>
<script>
    seajs.use('/static/js/game/group/list');

</script>

<script id="tp-normal" type="text/html">
    <% for (var i = 0; i < list.length; i ++) {
    var group = list[i];
    %>
    <tr>
        <td><input type="checkbox" name="normal-user-id" value=" <%= group.groupId %>" id="user-<%= group.groupId %>"/>
        </td>
        <td><%= group.groupName %></td>
        <td><%= dateFormat(group.createTime,'yyyy-MM-dd') %></td>
        <td><%= group.groupLevel %></td>
        <td><%= group.groupType %></td>
        <td><%= group.groupRemark %></td>
        <td>
            <a href="/group/detail?groupId=<%= group.groupId %>&editFlag=0" class="sui-btn btn-link btn-small ">查看</a>
            <a href="/group/detail?groupId=<%= group.groupId %>&editFlag=1" class="sui-btn btn-link btn-small">编辑</a>
            <a href="javascript:void(0);" data-id="<%= group.groupId %>" data-name="<%= group.groupName %>"
               class="sui-btn btn-link btn-small dis-activate-user">注销</a>
        </td>
    </tr>
    <% } %>
</script>
<script id="tp-delete" type="text/html">
    <% for (var i = 0; i < list.length; i ++) {
    var group = list[i];
    %>
    <tr>
        <td><input type="checkbox" name="delete-user-id" value=" <%= group.groupId %>" id="user-<%= group.groupId %>"/>
        </td>
        <td><%= group.groupName %></td>
        <td><%= dateFormat(group.createTime,'yyyy-MM-dd') %></td>
        <td><%= dateFormat(group.createTime,'yyyy-MM-dd') %></td>
        <td><%= group.groupLevel %></td>
        <td><%= group.groupType %></td>
        <td><%= group.groupRemark %></td>
        <td>
            <a href="/group/detail?groupId=<%= group.groupId %>&editFlag=1" class="sui-btn btn-link btn-small ">查看</a>
            <a href="javascript:void(0);" data-id="<%= group.groupId %>" data-name="<%= group.groupName %>"
               class="sui-btn btn-link btn-small activate-user">启用</a>
        </td>
    </tr>
    <% } %>
</script>
</body>
</html>
